# 与，并且 and
print(True and False)
print(True and True)
print(True and True and 2<3)
print('dd' and True and True and 2<3)
print('hello' and 'hi') # hi 只有字符串，短路运算
print('' and 'hi') # 前面直接空，返回空,不往后看了
print(0 and 1) # 0,

# 或者or
print(True or False) # True
print(True or True) # True
print(False or False) # False

# 第一个满足了，不往下读
print(1 or 0) # 1
print(2024 or 2025 or 0) # 2024
# 前两个不满足，继续往下读
print(0 or '' or 888) # 888

# 非not
print(not True) # False
print(not 1) # False
print(not 0) # True
print(not '') # True

# 优先级 not>and>or
print(True and False and not False) # False
print(True or False and True or False) # True